import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib as mpl

mpl.rcParams['pdf.fonttype'] = 42
mpl.rcParams['ps.fonttype'] = 42
mpl.rcParams['axes.linewidth'] = 1.5
mpl.rcParams['lines.linewidth'] = 3
mpl.rcParams['lines.markersize'] = 10
mpl.rcParams['font.size'] = 15
mpl.rcParams['xtick.labelsize'] = 14
mpl.rcParams['ytick.labelsize'] = 16
mpl.rcParams['legend.fontsize'] = 14
mpl.rcParams['legend.framealpha'] = 0
mpl.rcParams['legend.borderpad'] = 0.1
mpl.rcParams["axes.labelweight"] = "bold"
mpl.rcParams["axes.labelsize"] = 14
mpl.rcParams['font.family'] = 'sans-serif'
mpl.rcParams['figure.figsize'] = (8, 2.5)

df = pd.read_csv('tobdd.csv', sep=",")
print(df)


sns.barplot(x = 'Dataset',
            y = 'Time',
            hue = 'System',
            data = df,
            palette = "Dark2")
plt.ylabel('Time (ms)')
plt.legend().set_title(None)
plt.yscale('log')
plt.tight_layout(pad=0)
plt.savefig('toflash.pdf')
# Show the plot
plt.show()